/**
 * @description 储存各种环境的配置
 */

const { isPrd } = require('../utils/env')

let REDIS_CONF = {
  port: 6379,
  host: '127.0.0.1'
}

let MYSQL_CONF = {
  host: 'localhost',
  user: 'root',
  password: 'yangbo520',
  port: '3306',
  database: 'koa2-sequelize-vue-weibo'
}

if (isPrd) {
  //生产环境下
  let REDIS_CONF = {
    port: 6379,
    host: '127.0.0.1'
  }
  
  let MYSQL_CONF = {
    host: 'localhost',
    user: 'root',
    password: 'yangbo520',
    port: '3306',
    database: 'koa2-sequelize-vue-weibo'
  }
}

module.exports = {
  REDIS_CONF,
  MYSQL_CONF
}
